//
//  GrowthAppDelegate.h
//  Growth
//
//  Created by Hobo.Chen on 12/26/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UploadDataViewController.h"
#import "ForumMainViewViewController.h"
#import "ForumPostDetailViewController.h"
#import "BlogMainViewViewController.h"
#import "SettingViewController.h"

#import "UnreadOrdersViewController.h"
#import "HaveReadOrdersViewController.h"
#import "TransferToCenterViewController.h"



#define UMENG_APPKEY @"4fa1d88f52701555cb00002d"


@interface GrowthAppDelegate : NSObject <UIApplicationDelegate,UITabBarControllerDelegate> {
    UIWindow *window;
    
  // IBOutlet UITabBarController  *tabBarController;
    
	UIView *loadingView;
	
	//第三方
	//QQ
	NSString *qqAppKey;
	NSString *qqAppSecret;
	NSString *qqTokenKey;
	NSString *qqTokenSecret;
	NSString *qqVerifier;
	
	NSURLConnection *qqConnection;
	NSMutableData *qqResponseData;	
	
	//Sina
	NSString *sinaAppKey;
	NSString *sinaAppSecret;
	NSString *sinaTokenKey;
	NSString *sinaTokenSecret;
	NSString *sinaVerifier;
    NSString *sinaUserId;
	
	NSURLConnection *sinaConnection;
	NSMutableData *sinaResponseData;
   
    
}

@property (nonatomic, retain) IBOutlet UIWindow *window;


@property (nonatomic, retain) UIView *loadingView;

@property (nonatomic, retain) UIViewController *firstController;


//第三方
//qq
@property (nonatomic, copy) NSString *qqAppKey;
@property (nonatomic, copy) NSString *qqAppSecret;
@property (nonatomic, copy) NSString *qqTokenKey;
@property (nonatomic, copy) NSString *qqTokenSecret;
@property (nonatomic, copy) NSString *qqVerifier;
@property (nonatomic, copy) NSString *qqResponse;

//Sina
@property (nonatomic, copy) NSString *sinaAppKey;
@property (nonatomic, copy) NSString *sinaAppSecret;
@property (nonatomic, copy) NSString *sinaTokenKey;
@property (nonatomic, copy) NSString *sinaTokenSecret;
@property (nonatomic, copy) NSString *sinaVerifier;
@property (nonatomic, copy) NSString *sinaResponse;
@property (nonatomic, copy) NSString *sinaUserId;

- (void)loadMainView;

- (UIView *)getLoadingView;

- (void)reloadTabBarController;

//第三方
//qq
-(void)setTokenDefault;
- (void)qqParseTokenKeyWithResponse:(NSString *)aResponse ;
- (void)qqSaveDefaultKey ;
//sina

- (void)sinaParseTokenKeyWithResponse:(NSString *)aResponse ;
- (void)sinaSaveDefaultKey;



@end

